<?php

namespace Home\Controller;

use Think\Controller;
class CommonController extends Controller {

	public $local_token = "wysx520"; //99845f024dc6d31f71ecd4cb8bf281c0
	public $open_send_authcode = false;	//是否开启发送验证码

	//初始化
    public function _initialize(){

		//检测用户token，token有误则直接终止
		// $this->check_token($_POST['token']);
    }

    
	//检测用户token
	public function check_token($token)
	{
		//如果token有误
		if (md5($this->local_token) != $token) {
			// echo $token;exit;
			dump($_POST);exit;
			echo '{"msg":"无效的请求！"}';	//token无效
			exit;
		}
	}

}